<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): include/insertion_operator.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">insertion_operator.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="insertion__operator_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="outfilename_8hpp.html">outfilename.hpp</a>&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#ifndef __INSERTION_OPERATOR_HPP</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#define __INSERTION_OPERATOR_HPP</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">template</span>&lt; <span class="keyword">typename</span> T</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;          , <span class="keyword">template</span>&lt;<span class="keyword">typename</span> ELEM, <span class="keyword">typename</span> ALLOC=std::allocator&lt;ELEM&gt; &gt; <span class="keyword">class </span>Container</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;          &gt;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="insertion__operator_8hpp.html#a8756705c5c234bd19c639ea105b2b138">   20</a></span>&#160;std::ostream&amp; <a class="code" href="insertion__operator_8hpp.html#a8756705c5c234bd19c639ea105b2b138">operator&lt;&lt; </a>(std::ostream&amp; out, <span class="keyword">const</span> Container&lt;T&gt;&amp; container)</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="keywordflow">if</span> ( container.size() &gt; 0 ) {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keyword">typename</span> Container&lt;T&gt;::const_iterator beg = container.begin();</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordflow">if</span> (beg != container.end())</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;      out &lt;&lt; *beg;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    beg++;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">while</span>(beg != container.end())</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      {</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        out &lt;&lt; <a class="code" href="classinout_1_1_out_file_name.html#a109f96b53357d1780b4f838b5623c22f">inout::OutFileName::getDelim</a>() &lt;&lt; *beg++;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      }</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keywordflow">return</span> out;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;}</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*__INSERTION_OPERATOR_HPP*/</span><span class="preprocessor"></span></div><div class="ttc" id="classinout_1_1_out_file_name_html_a109f96b53357d1780b4f838b5623c22f"><div class="ttname"><a href="classinout_1_1_out_file_name.html#a109f96b53357d1780b4f838b5623c22f">inout::OutFileName::getDelim</a></div><div class="ttdeci">static const char getDelim()</div><div class="ttdef"><b>Definition:</b> <a href="outfilename_8hpp_source.html#l00079">outfilename.hpp:79</a></div></div>
<div class="ttc" id="outfilename_8hpp_html"><div class="ttname"><a href="outfilename_8hpp.html">outfilename.hpp</a></div><div class="ttdoc">out file name</div></div>
<div class="ttc" id="insertion__operator_8hpp_html_a8756705c5c234bd19c639ea105b2b138"><div class="ttname"><a href="insertion__operator_8hpp.html#a8756705c5c234bd19c639ea105b2b138">operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;out, const Container&lt; T &gt; &amp;container)</div><div class="ttdef"><b>Definition:</b> <a href="insertion__operator_8hpp_source.html#l00020">insertion_operator.hpp:20</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:31 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
